﻿<Window x:Class="Zephyr.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
        Title="Zephyr" Height="591" Width="756" Closing="Window_Closing">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <Menu Margin="0,0,0,0" Grid.Row="0" IsMainMenu="True">
            <Menu.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFFBFDFE" Offset="0" />
                    <GradientStop Color="#FFD7E9FA" Offset="1" />
                </LinearGradientBrush>
            </Menu.Background>
            <MenuItem Header="_File">
                <MenuItem Header="_Exit" Click="Button_Exit" InputGestureText="Ctrl+E" />
            </MenuItem>
            <MenuItem Header="_Connection">
                <MenuItem Header="Live" IsEnabled="False" />
                <MenuItem Name="_menu_ConnectSterling" Header="_Sterling" IsCheckable="True" Checked="ButtonConnectSterling_Click" InputGestureText="Ctrl+S" />
                <Separator />
                <MenuItem Header="Simulation" IsEnabled="False" />
                <MenuItem Name="_menu_ConnectBatsReplay" Header="_Bats Replay" Click="ButtonConnectBatsReplay_Click" InputGestureText="Ctrl+B" />
                <MenuItem Name="_menu_ConnectSterlingSimulation" Header="Sterling" IsCheckable="True" Checked="ButtonConnectSterlingSimulation_Click" />
            </MenuItem>
        </Menu>

        <!--ToolBarTray Background="#FFE9ECFA" Grid.Row="1">
            <ToolBar x:Name="_toolBar_Main" Background="{x:Null}" Width="Auto" HorizontalAlignment="Left">
                <Button Content="Prices" Height="23" Name="buttonPrices" Width="75" HorizontalAlignment="Left" VerticalAlignment="Top" BorderBrush="{x:Null}" Background="{x:Null}"></Button>
                <Button Content="Start" Height="23" Name="buttonStart" Width="75" HorizontalAlignment="Left" VerticalAlignment="Top" BorderBrush="{x:Null}" Background="{x:Null}"></Button>
            </ToolBar>
            <ToolBar x:Name="_toolBar_Save" Background="{x:Null}" Width="Auto" HorizontalAlignment="Right">
                <Button Content="Save All" Height="23" HorizontalAlignment="Right" Name="_button_SaveAll" VerticalAlignment="Top" Width="75" Background="{x:Null}"></Button>
            </ToolBar>
        </ToolBarTray-->




        <ad:DockingManager x:Name="_dockManager" Grid.Row="1">
            <ad:ResizingPanel Orientation="Vertical">
                <ad:ResizingPanel Orientation="Horizontal">
                    <ad:DockablePane ad:ResizingPanel.ResizeWidth="150"/>
                    <ad:DocumentPane>

                        <ad:DocumentContent x:Name="_dockContent_DastanUnitSummary" Title="Dastan Summary" IsCloseable="False">
                            <Grid>
                                <DataGrid Margin="6,6,6,6" Name="_dataGrid_DastanUnitSummary" FrozenColumnCount="1" AlternatingRowBackground="#FFE9ECFA" Height="Auto" Width="Auto" Sorting="SortDataGrid">
                                    <DataGrid.Columns>
                                        <DataGridTextColumn Header="Strategy" Binding="{Binding Name, Mode=OneWay}" IsReadOnly="True"  />
                                        <DataGridTextColumn Header="Position" Binding="{Binding Position, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Unreal PL" Binding="{Binding UnrealPL, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Real PL" Binding="{Binding RealPL, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Net PL" Binding="{Binding NetPL, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    </DataGrid.Columns>
                                </DataGrid>
                            </Grid>
                        </ad:DocumentContent>

                        <ad:DocumentContent x:Name="_dockContent_DastanUnits" Title="Dastan Executions" IsCloseable="False">
                            <Grid>
                                <DataGrid Margin="6,6,6,6" Name="_dataGrid_DastanUnits" AlternatingRowBackground="#FFE9ECFA" Height="Auto" Width="Auto" Sorting="SortDataGrid">
                                    <DataGrid.Columns>
                                        <DataGridTextColumn Header="Strategy" Binding="{Binding Name, Mode=OneWay}" IsReadOnly="True"  />
                                        <DataGridTextColumn Header="Direction" Binding="{Binding Direction, Mode=OneWay}" IsReadOnly="True"  />
                                        <DataGridTextColumn Header="Quantity" Binding="{Binding Quantity, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Remaining" Binding="{Binding Remaining, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Entry Target" Binding="{Binding EntryTarget, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Entry Actual" Binding="{Binding EntryActual, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Exit Target" Binding="{Binding ExitTarget, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Exit Actual" Binding="{Binding ExitActual, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Profit" Binding="{Binding Profit, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Slip Entry" Binding="{Binding SlipEntry, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Slip Exit" Binding="{Binding SlipExit, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Entry Time" Binding="{Binding TimeStampEntry, Mode=OneWay}" IsReadOnly="True" />
                                        <DataGridTextColumn Header="Exit Time" Binding="{Binding TimeStampExit, Mode=OneWay}" IsReadOnly="True" />
                                    </DataGrid.Columns>
                                </DataGrid>
                            </Grid>
                        </ad:DocumentContent>

                        <ad:DocumentContent x:Name="_dockContent_TerrapinUnitSummary" Title="Terrapin Summary" IsCloseable="False">
                            <Grid>
                                <DataGrid Margin="6,6,6,6" Name="_dataGrid_TerrapinUnitSummary" FrozenColumnCount="1" AlternatingRowBackground="#FFE9ECFA" Height="Auto" Width="Auto" Sorting="SortDataGrid">
                                    <DataGrid.Columns>
                                        <DataGridTextColumn Header="Strategy" Binding="{Binding Name, Mode=OneWay}" IsReadOnly="True"  />
                                        <DataGridTextColumn Header="Position" Binding="{Binding Position, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Unreal PL" Binding="{Binding UnrealPL, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Real PL" Binding="{Binding RealPL, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Net PL" Binding="{Binding NetPL, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    </DataGrid.Columns>
                                </DataGrid>
                            </Grid>
                        </ad:DocumentContent>

                        <ad:DocumentContent x:Name="_dockContent_TerrapinUnits" Title="Terrapin Executions" IsCloseable="False">
                            <Grid>
                                <DataGrid Margin="6,6,6,6" Name="_dataGrid_TerrapinUnits" AlternatingRowBackground="#FFE9ECFA" Height="Auto" Width="Auto" Sorting="SortDataGrid">
                                    <DataGrid.Columns>
                                        <DataGridTextColumn Header="Strategy" Binding="{Binding Name, Mode=OneWay}" IsReadOnly="True"  />
                                        <DataGridTextColumn Header="Direction" Binding="{Binding Direction, Mode=OneWay}" IsReadOnly="True"  />
                                        <DataGridTextColumn Header="Quantity" Binding="{Binding Quantity, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Remaining" Binding="{Binding Remaining, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Entry Target" Binding="{Binding EntryTarget, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Entry Actual" Binding="{Binding EntryActual, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Exit Target" Binding="{Binding ExitTarget, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Exit Actual" Binding="{Binding ExitActual, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Profit" Binding="{Binding Profit, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Slip Entry" Binding="{Binding SlipEntry, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Slip Exit" Binding="{Binding SlipExit, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Entry Time" Binding="{Binding TimeStampEntry, Mode=OneWay}" IsReadOnly="True" />
                                        <DataGridTextColumn Header="Exit Time" Binding="{Binding TimeStampExit, Mode=OneWay}" IsReadOnly="True" />
                                    </DataGrid.Columns>
                                </DataGrid>
                            </Grid>
                        </ad:DocumentContent>

                        <ad:DocumentContent x:Name="_dockContent_MossUnitSummary" Title="Moss Summary" IsCloseable="False">
                            <Grid>
                                <DataGrid Margin="6,6,6,6" Name="_dataGrid_MossUnitSummary" FrozenColumnCount="1" AlternatingRowBackground="#FFE9ECFA" Height="Auto" Width="Auto" Sorting="SortDataGrid">
                                    <DataGrid.Columns>
                                        <DataGridTextColumn Header="Strategy" Binding="{Binding Name, Mode=OneWay}" IsReadOnly="True"  />
                                        <DataGridTextColumn Header="Position" Binding="{Binding Position, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Unreal PL" Binding="{Binding UnrealPL, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Real PL" Binding="{Binding RealPL, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Net PL" Binding="{Binding NetPL, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    </DataGrid.Columns>
                                </DataGrid>
                            </Grid>
                        </ad:DocumentContent>

                        <ad:DocumentContent x:Name="_dockContent_MossUnits" Title="Moss Executions" IsCloseable="False">
                            <Grid>
                                <DataGrid Margin="6,6,6,6" Name="_dataGrid_MossUnits" AlternatingRowBackground="#FFE9ECFA" Height="Auto" Width="Auto" Sorting="SortDataGrid">
                                    <DataGrid.Columns>
                                        <DataGridTextColumn Header="Strategy" Binding="{Binding Name, Mode=OneWay}" IsReadOnly="True"  />
                                        <DataGridTextColumn Header="Direction" Binding="{Binding Direction, Mode=OneWay}" IsReadOnly="True"  />
                                        <DataGridTextColumn Header="Quantity" Binding="{Binding Quantity, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Remaining" Binding="{Binding Remaining, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Entry Target" Binding="{Binding EntryTarget, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Entry Actual" Binding="{Binding EntryActual, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Exit Target" Binding="{Binding ExitTarget, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Exit Actual" Binding="{Binding ExitActual, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Profit" Binding="{Binding Profit, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Slip Entry" Binding="{Binding SlipEntry, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Slip Exit" Binding="{Binding SlipExit, StringFormat=\{0:F2\}, Mode=OneWay}" IsReadOnly="True"  CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                        <DataGridTextColumn Header="Entry Time" Binding="{Binding TimeStampEntry, Mode=OneWay}" IsReadOnly="True" />
                                        <DataGridTextColumn Header="Exit Time" Binding="{Binding TimeStampExit, Mode=OneWay}" IsReadOnly="True" />
                                    </DataGrid.Columns>
                                </DataGrid>
                            </Grid>
                        </ad:DocumentContent>

                        <ad:DocumentContent x:Name="_dockContent_Prices" Title="Price Matrix"  IsCloseable="False">
                            <Grid>
                                <DataGrid Margin="6,35,6,6" Name="_dataGrid_Prices" FrozenColumnCount="1"  AlternatingRowBackground="#FFE9ECFA" Height="Auto" Width="Auto">
                                    <DataGrid.Columns>
                                        <DataGridTextColumn Header="Symbol" Binding="{Binding Symbol}" />

                                        <DataGridTextColumn Header="Phase" Binding="{Binding Phase}" />

                                        <DataGridTextColumn Header="Time" Binding="{Binding LastTimeStamp}" />

                                        <DataGridTextColumn Header="VWAP" Binding="{Binding VWAP, StringFormat=\{0:F2\}}">
                                            <DataGridTextColumn.CellStyle>
                                                <Style TargetType="{x:Type DataGridCell}">
                                                    <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                                </Style>
                                            </DataGridTextColumn.CellStyle>
                                        </DataGridTextColumn>

                                        <DataGridTextColumn Header="Last Price" Binding="{Binding LastPrice, StringFormat=\{0:F2\}}">
                                            <DataGridTextColumn.CellStyle>
                                                <Style TargetType="{x:Type DataGridCell}">
                                                    <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                                </Style>
                                            </DataGridTextColumn.CellStyle>
                                        </DataGridTextColumn>
                                        <DataGridTextColumn Header="Last Volume" Binding="{Binding LastVolume, StringFormat=\{0:N0\}}" />

                                        <DataGridTextColumn Header="Bid Price" Binding="{Binding BidPrice, StringFormat=\{0:F2\}}">
                                            <DataGridTextColumn.CellStyle>
                                                <Style TargetType="{x:Type DataGridCell}">
                                                    <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                                </Style>
                                            </DataGridTextColumn.CellStyle>
                                        </DataGridTextColumn>
                                        <DataGridTextColumn Header="Bid Volume" Binding="{Binding BidVolume, StringFormat=\{0:N0\}}" />

                                        <DataGridTextColumn Header="Ask Price" Binding="{Binding AskPrice, StringFormat=\{0:F2\}}">
                                            <DataGridTextColumn.CellStyle>
                                                <Style TargetType="{x:Type DataGridCell}">
                                                    <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                                </Style>
                                            </DataGridTextColumn.CellStyle>
                                        </DataGridTextColumn>
                                        <DataGridTextColumn Header="Ask Volume" Binding="{Binding AskVolume, StringFormat=\{0:N0\}}" />

                                        <DataGridTextColumn Header="Open" Binding="{Binding Open, StringFormat=\{0:F2\}}">
                                            <DataGridTextColumn.CellStyle>
                                                <Style TargetType="{x:Type DataGridCell}">
                                                    <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                                </Style>
                                            </DataGridTextColumn.CellStyle>
                                        </DataGridTextColumn>
                                        <DataGridTextColumn Header="High" Binding="{Binding High, StringFormat=\{0:F2\}}">
                                            <DataGridTextColumn.CellStyle>
                                                <Style TargetType="{x:Type DataGridCell}">
                                                    <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                                </Style>
                                            </DataGridTextColumn.CellStyle>
                                        </DataGridTextColumn>
                                        <DataGridTextColumn Header="Low" Binding="{Binding Low, StringFormat=\{0:F2\}}">
                                            <DataGridTextColumn.CellStyle>
                                                <Style TargetType="{x:Type DataGridCell}">
                                                    <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                                </Style>
                                            </DataGridTextColumn.CellStyle>
                                        </DataGridTextColumn>
                                        <DataGridTextColumn Header="Close" Binding="{Binding Close, StringFormat=\{0:F2\}}">
                                            <DataGridTextColumn.CellStyle>
                                                <Style TargetType="{x:Type DataGridCell}">
                                                    <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                                </Style>
                                            </DataGridTextColumn.CellStyle>
                                        </DataGridTextColumn>
                                        <DataGridTextColumn Header="Volume" Binding="{Binding Volume, StringFormat=\{0:N0\}}">
                                            <DataGridTextColumn.CellStyle>
                                                <Style TargetType="{x:Type DataGridCell}">
                                                    <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                                </Style>
                                            </DataGridTextColumn.CellStyle>
                                        </DataGridTextColumn>

                                    </DataGrid.Columns>
                                    <DataGrid.GroupStyle>
                                        <GroupStyle>
                                            <GroupStyle.HeaderTemplate>
                                                <DataTemplate>
                                                    <StackPanel>
                                                        <TextBlock Text="{Binding Path=Name}" FontWeight="Bold" Padding="3" />
                                                    </StackPanel>
                                                </DataTemplate>
                                            </GroupStyle.HeaderTemplate>
                                            <GroupStyle.ContainerStyle>
                                                <Style TargetType="{x:Type GroupItem}">
                                                    <Setter Property="Template">
                                                        <Setter.Value>
                                                            <ControlTemplate TargetType="{x:Type GroupItem}">
                                                                <Expander IsExpanded="True">
                                                                    <Expander.Header>
                                                                        <StackPanel Orientation="Horizontal">
                                                                            <TextBlock Text="{Binding Path=Name}" />
                                                                            <TextBlock Text="{Binding Path=ItemCount}" Margin="8,0,4,0" />
                                                                            <TextBlock Text="Items" />
                                                                        </StackPanel>
                                                                    </Expander.Header>
                                                                    <ItemsPresenter />
                                                                </Expander>
                                                            </ControlTemplate>
                                                        </Setter.Value>
                                                    </Setter>
                                                </Style>
                                            </GroupStyle.ContainerStyle>
                                        </GroupStyle>
                                    </DataGrid.GroupStyle>
                                </DataGrid>
                                <ComboBox Height="23" Margin="6,6,0,0" Name="_combo_PricesGrouping" VerticalAlignment="Top" Text="Grouping" SelectionChanged="ComboBoxPricesGrouping_SelectionChanged" HorizontalAlignment="Left" Width="120" />
                            </Grid>
                        </ad:DocumentContent>



                        <ad:DocumentContent x:Name="_dockContent_SpikeArb" Title="Spike Executions"  IsCloseable="False">
                            <Grid>
                                <DataGrid Margin="6,6,6,6" Name="_dataGrid_SpikeArb" FrozenColumnCount="1"  AlternatingRowBackground="#FFE9ECFA" Height="Auto" Width="Auto" Sorting="SortDataGrid" />
                            </Grid>
                        </ad:DocumentContent>

                    </ad:DocumentPane>


                </ad:ResizingPanel>

                <ad:DockablePane ad:ResizingPanel.ResizeHeight="200">

                    <ad:DockableContent Title="Log" x:Name="_dockContent_Log" IsCloseable="False">
                        <ListView>
                            <ListView.View>
                                <GridView>
                                    <GridView.Columns>
                                        <GridViewColumn Header="Error"/>
                                        <GridViewColumn Header="Page"/>
                                        <GridViewColumn Header="File"/>
                                        <GridViewColumn Header="Row"/>
                                    </GridView.Columns>
                                </GridView>
                            </ListView.View>
                        </ListView>
                    </ad:DockableContent>

                    <ad:DockableContent Title="Spike Config" x:Name="_dockContent_SpikeArbSettings" IsCloseable="False">
                        <Grid>

                            <Button Name="_button_SpikeLoad"  Click="ButtonSpikeStart_Click" Content="Load" Height="23"  Width="75" Margin="0,6,87,0" VerticalAlignment="Top" HorizontalAlignment="Right" />
                            <Button Name="_button_SpikeSave" Click="ButtonSpikeSave_Click" Content="Save" Height="23" Margin="0,6,6,0" HorizontalAlignment="Right" Width="75" VerticalAlignment="Top" IsEnabled="False" />

                            <DataGrid Name="_dataGrid_SpikeArbSettings" FrozenColumnCount="1" AlternatingRowBackground="#FFE9ECFA" Margin="6,57,6,6" Width="Auto" Height="Auto" Sorting="SortDataGrid">
                                <DataGrid.Columns>
                                    <DataGridTextColumn Header="Symbol" Binding="{Binding Symbol, Mode=OneWay}" IsReadOnly="True" />
                                    <DataGridCheckBoxColumn Header="All" Binding="{Binding IsEnabled}" />
                                    <DataGridCheckBoxColumn Header="Main" Binding="{Binding IsEnabledPrimary}" />
                                    <DataGridCheckBoxColumn Header="ChiX" Binding="{Binding IsEnabledChix}" />
                                    <DataGridCheckBoxColumn Header="Bats" Binding="{Binding IsEnabledBats}" />
                                    <DataGridCheckBoxColumn Header="1" Binding="{Binding Collar1Enabled}" />
                                    <DataGridTextColumn Header="1 £" Binding="{Binding Collar1Val}">
                                        <DataGridTextColumn.CellStyle>
                                            <Style TargetType="{x:Type DataGridCell}">
                                                <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                            </Style>
                                        </DataGridTextColumn.CellStyle>
                                    </DataGridTextColumn>
                                    <DataGridTextColumn Header="1 %" Binding="{Binding Collar1Pct, StringFormat=\{0:F2\}}" />
                                    <DataGridTextColumn Header="1 ±" Binding="{Binding Collar1Win, StringFormat=\{0:F2\}}" />
                                    <DataGridCheckBoxColumn Header="2" Binding="{Binding Collar2Enabled}" />
                                    <DataGridTextColumn Header="2 £" Binding="{Binding Collar2Val}">
                                        <DataGridTextColumn.CellStyle>
                                            <Style TargetType="{x:Type DataGridCell}">
                                                <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                            </Style>
                                        </DataGridTextColumn.CellStyle>
                                    </DataGridTextColumn>
                                    <DataGridTextColumn Header="2 %" Binding="{Binding Collar2Pct, StringFormat=\{0:F2\}}" />
                                    <DataGridTextColumn Header="2 ±" Binding="{Binding Collar2Win, StringFormat=\{0:F2\}}" />
                                    <DataGridCheckBoxColumn Header="3" Binding="{Binding Collar3Enabled}" />
                                    <DataGridTextColumn Header="3 £" Binding="{Binding Collar3Val}">
                                        <DataGridTextColumn.CellStyle>
                                            <Style TargetType="{x:Type DataGridCell}">
                                                <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                            </Style>
                                        </DataGridTextColumn.CellStyle>
                                    </DataGridTextColumn>
                                    <DataGridTextColumn Header="3 %" Binding="{Binding Collar3Pct, StringFormat=\{0:F2\}}" />
                                    <DataGridTextColumn Header="3 ±" Binding="{Binding Collar3Win, StringFormat=\{0:F2\}}" />
                                    <DataGridCheckBoxColumn Header="4" Binding="{Binding Collar4Enabled}" />
                                    <DataGridTextColumn Header="4 £" Binding="{Binding Collar4Val}">
                                        <DataGridTextColumn.CellStyle>
                                            <Style TargetType="{x:Type DataGridCell}">
                                                <Setter Property="TextBlock.TextAlignment" Value="Right" />
                                            </Style>
                                        </DataGridTextColumn.CellStyle>
                                    </DataGridTextColumn>
                                    <DataGridTextColumn Header="4 %" Binding="{Binding Collar4Pct, StringFormat=\{0:F2\}}" />
                                    <DataGridTextColumn Header="4 ±" Binding="{Binding Collar4Win, StringFormat=\{0:F2\}}" />
                                </DataGrid.Columns>
                                <DataGrid.GroupStyle>
                                    <GroupStyle>
                                        <GroupStyle.HeaderTemplate>
                                            <DataTemplate>
                                                <StackPanel>
                                                    <TextBlock Text="{Binding Path=Name}" FontWeight="Bold" Padding="3" />
                                                </StackPanel>
                                            </DataTemplate>
                                        </GroupStyle.HeaderTemplate>
                                        <GroupStyle.ContainerStyle>
                                            <Style TargetType="{x:Type GroupItem}">
                                                <Setter Property="Template">
                                                    <Setter.Value>
                                                        <ControlTemplate TargetType="{x:Type GroupItem}">
                                                            <Expander IsExpanded="True">
                                                                <Expander.Header>
                                                                    <StackPanel Orientation="Horizontal">
                                                                        <TextBlock Text="{Binding Path=Name}" />
                                                                        <TextBlock Text="{Binding Path=ItemCount}" Margin="8,0,4,0" />
                                                                        <TextBlock Text="Items" />
                                                                    </StackPanel>
                                                                </Expander.Header>
                                                                <ItemsPresenter />
                                                            </Expander>
                                                        </ControlTemplate>
                                                    </Setter.Value>
                                                </Setter>
                                            </Style>
                                        </GroupStyle.ContainerStyle>
                                    </GroupStyle>
                                </DataGrid.GroupStyle>
                            </DataGrid>
                            <CheckBox Content="Chi-X" Height="16" HorizontalAlignment="Left" Margin="65,35,0,0" Name="_checkBox_SpikePauseChix" VerticalAlignment="Top" Width="49" Checked="CheckBoxSpikePause_Checked" Unchecked="CheckBoxSpikePause_Checked" />
                            <CheckBox Content="Bats" Height="16" HorizontalAlignment="Left" Margin="120,35,0,0" Name="_checkBox_SpikePauseBats" VerticalAlignment="Top" Width="41" Checked="CheckBoxSpikePause_Checked" Unchecked="CheckBoxSpikePause_Checked" />
                            <CheckBox Content="Main" Height="16" HorizontalAlignment="Left" Margin="11,35,0,0" Name="_checkBox_SpikePausePrimary" VerticalAlignment="Top" Width="48" Checked="CheckBoxSpikePause_Checked" Unchecked="CheckBoxSpikePause_Checked" />
                            <CheckBox Content="Collar 1" Height="16" HorizontalAlignment="Left" Margin="167,35,0,0" Name="_checkBox_SpikePauseCollar1" VerticalAlignment="Top" Width="61" Checked="CheckBoxSpikePause_Checked" Unchecked="CheckBoxSpikePause_Checked" />
                            <CheckBox Content="Collar 2" Height="16" HorizontalAlignment="Left" Margin="234,35,0,0" Name="_checkBox_SpikePauseCollar2" VerticalAlignment="Top" Width="61" Checked="CheckBoxSpikePause_Checked" Unchecked="CheckBoxSpikePause_Checked" />
                            <CheckBox Content="Collar 3" Height="16" Margin="301,35,0,0" Name="_checkBox_SpikePauseCollar3" VerticalAlignment="Top" HorizontalAlignment="Left" Width="61" Checked="CheckBoxSpikePause_Checked" Unchecked="CheckBoxSpikePause_Checked" />
                            <CheckBox Content="Collar 4" Height="16" HorizontalAlignment="Left" Margin="368,35,0,0" Name="_checkBox_SpikePauseCollar4" VerticalAlignment="Top" Width="61" Checked="CheckBoxSpikePause_Checked" Unchecked="CheckBoxSpikePause_Checked" />
                            <ComboBox Height="23" HorizontalAlignment="Left" Margin="6,6,0,0" Name="_comboBox_SpikeAccount" VerticalAlignment="Top" Width="81" SelectionChanged="ComboBox_Account_SelectionChanged">
                                <ComboBoxItem Name="_comboBoxItem_SpikeAccount1" IsSelected="True">LQA001</ComboBoxItem>
                                <ComboBoxItem Name="_comboBoxItem_SpikeAccount2">LQD001</ComboBoxItem>
                                <ComboBoxItem Name="_comboBoxItem_SpikeAccount3">LQD014</ComboBoxItem>
                                <ComboBoxItem Name="_comboBoxItem_SpikeAccount4">DEMO368</ComboBoxItem>
                            </ComboBox>
                        </Grid>
                    </ad:DockableContent>


                    <ad:DockableContent Title="Dastan Config" x:Name="_dockContent_DastanSettings" IsCloseable="False">
                        <Grid>
                            <ComboBox Name="_comboBox_DastanStock" Height="23" HorizontalAlignment="Left" Margin="6,6,0,0" VerticalAlignment="Top" Width="63" 
                                      DisplayMemberPath="Key"
                                      SelectedValuePath="Value"
                                      IsEnabled="False" SelectionChanged="ComboBox_DastanStock_SelectionChanged" />
                            <ComboBox Name="_comboBox_DastanIndex" Height="23" HorizontalAlignment="Left" Margin="75,6,0,0" VerticalAlignment="Top" Width="63" 
                                      IsEnabled="False" SelectionChanged="ComboBox_DastanIndex_SelectionChanged" />
                            <ComboBox Name="_comboBox_DastanAccount" Height="23" Margin="144,6,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="70" IsEnabled="False">
                                <ComboBoxItem IsSelected="True">LQA001</ComboBoxItem>
                                <ComboBoxItem>LQD014</ComboBoxItem>
                                <ComboBoxItem>DEMO368</ComboBoxItem>
                            </ComboBox>
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="220,6,0,0" Name="_textBox_DastanValue" VerticalAlignment="Top" Width="54" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="280,6,0,0" Name="_textBox_DastanEntry" VerticalAlignment="Top" Width="30" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="316,6,0,0" Name="_textBox_DastanExit" VerticalAlignment="Top" Width="30" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="352,6,0,0" Name="_textBox_DastanAverage" VerticalAlignment="Top" Width="30" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="388,6,0,0" Name="_textBox_DastanTickCount" VerticalAlignment="Top" Width="30" />
                            <Button Name="_button_DastanAdd" Click="ButtonDastanAdd_Click" Content="Add" IsDefault="True" Height="23" Margin="424,6,0,0" VerticalAlignment="Top" IsEnabled="False" HorizontalAlignment="Left" Width="31" />
                            <Button Name="_button_DastanLoad" Click="ButtonDastanLoad_Click" Content="Load" Height="23"  Width="75" Margin="0,6,87,0" VerticalAlignment="Top" HorizontalAlignment="Right" />
                            <Button Name="_button_DastanSave" Click="ButtonDastanSave_Click" Content="Save" Height="23" Margin="0,6,6,0" HorizontalAlignment="Right" Width="75" VerticalAlignment="Top" IsEnabled="False" />
                            <DataGrid Name="_dataGrid_DastanSettings" AlternatingRowBackground="#FFE9ECFA" Margin="6,35,6,6" Width="Auto" Height="Auto" Sorting="SortDataGrid">
                                <DataGrid.Columns>
                                    <DataGridCheckBoxColumn Header="On" Binding="{Binding IsEnabled}" />
                                    <DataGridTextColumn Header="Security" Binding="{Binding Security, Mode=OneWay}" />
                                    <DataGridTextColumn Header="Sector" Binding="{Binding Sector, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Unit Value" Binding="{Binding UnitValue}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Entry Bars" Binding="{Binding EntryBars}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Exit Bars" Binding="{Binding ExitBars}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="SMA Period" Binding="{Binding AveragePeriod}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Ticks Per Bar" Binding="{Binding TicksPerBar, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Phase" Binding="{Binding Phase, Mode=OneWay}" />
                                    <DataGridTemplateColumn Header="Cut">
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <Button Click="ButtonDastanClosePosition_Click">Cut</Button>
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                    <DataGridTextColumn Header="Ticks" Binding="{Binding Ticks, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="Last" Binding="{Binding Last, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="High" Binding="{Binding High, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="Low" Binding="{Binding Low, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="Fast" Binding="{Binding MAFast, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="Slow" Binding="{Binding MASlow, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="Filter" Binding="{Binding Filter, Mode=OneWay}" />
                                    <DataGridTemplateColumn Header="Remove">
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <Button Click="ButtonDastanRemove_Click">Delete</Button>
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                </DataGrid.Columns>
                            </DataGrid>
                        </Grid>
                    </ad:DockableContent>



                    <ad:DockableContent Title="Moss Config" x:Name="_dockContent_MossSettings" IsCloseable="False">
                        <Grid>
                            <ComboBox Name="_comboBox_MossStock" Height="23" HorizontalAlignment="Left" Margin="6,6,0,0" VerticalAlignment="Top" Width="63" 
                                      DisplayMemberPath="Key"
                                      SelectedValuePath="Value"
                                      IsEnabled="False" />
                            <ComboBox Name="_comboBox_MossAccount" Height="23" Margin="75,6,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="70" IsEnabled="False">
                                <ComboBoxItem>LQD001</ComboBoxItem>
                                <ComboBoxItem>DEMO368</ComboBoxItem>
                                <ComboBoxItem>LTDEMO1</ComboBoxItem>
                            </ComboBox>
                            <Button Name="_button_MossAdd" Click="ButtonMossAdd_Click" Content="Add" IsDefault="True" Height="23" Width="31" Margin="151,6,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" IsEnabled="False" />
                            <Button Name="_button_MossLoad" Click="ButtonMossLoad_Click" Content="Load" Height="23"  Width="75" Margin="0,6,87,0" VerticalAlignment="Top" HorizontalAlignment="Right" />
                            <Button Name="_button_MossSave" Click="ButtonMossSave_Click" Content="Save" Height="23" Margin="0,6,6,0" HorizontalAlignment="Right" Width="75" VerticalAlignment="Top" IsEnabled="False" />
                            <DataGrid Name="_dataGrid_MossSettings" AlternatingRowBackground="#FFE9ECFA" Margin="6,35,6,6" Width="Auto" Height="Auto" Sorting="SortDataGrid">
                                <DataGrid.Columns>
                                    <DataGridCheckBoxColumn Header="On" Binding="{Binding IsEnabled}" />
                                    <DataGridTextColumn Header="Security" Binding="{Binding Security, Mode=OneWay}" />
                                    <DataGridTextColumn Header="Unit Value" Binding="{Binding UnitValue}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="RSI Top" Binding="{Binding RSITop}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="RSI Bottom" Binding="{Binding RSIBottom}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="RSI Retrace" Binding="{Binding RSIRetrace}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Boll Period" Binding="{Binding BollyPeriod}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Boll SD" Binding="{Binding BollySTDEV}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Phase" Binding="{Binding Phase, Mode=OneWay}" />
                                    <DataGridTextColumn Header="Last" Binding="{Binding Last, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="RSI" Binding="{Binding RSI, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="BollyHigh" Binding="{Binding BollyHigh, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="BollyLow" Binding="{Binding BollyLow, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="MA" Binding="{Binding Average, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTemplateColumn Header="Remove">
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <Button Click="ButtonMossRemove_Click">Delete</Button>
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                </DataGrid.Columns>
                            </DataGrid>
                        </Grid>
                    </ad:DockableContent>

                    <ad:DockableContent Title="Terrapin Config" x:Name="_dockContent_TerrapinSettings" IsCloseable="False">
                        <Grid>
                            <ComboBox Name="_comboBox_TerrapinStock" Height="23" HorizontalAlignment="Left" Margin="6,6,0,0" VerticalAlignment="Top" Width="63" 
                                      DisplayMemberPath="Key"
                                      SelectedValuePath="Value"
                                      IsEnabled="False" SelectionChanged="ComboBox_TerrapinStock_SelectionChanged" />
                            <ComboBox Name="_comboBox_TerrapinIndex" Height="23" HorizontalAlignment="Left" Margin="75,6,0,0" VerticalAlignment="Top" Width="63" 
                                      IsEnabled="False" SelectionChanged="ComboBox_TerrapinIndex_SelectionChanged" />
                            <ComboBox Name="_comboBox_TerrapinAccount" Height="23" Margin="144,6,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="70" IsEnabled="False">
                                <ComboBoxItem IsSelected="True">LQA001</ComboBoxItem>
                                <ComboBoxItem>LQD014</ComboBoxItem>
                                <ComboBoxItem>DEMO368</ComboBoxItem>
                            </ComboBox>
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="220,6,0,0" Name="_textBox_TerrapinValue" VerticalAlignment="Top" Width="54" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="280,6,0,0" Name="_textBox_TerrapinEntry" VerticalAlignment="Top" Width="30" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="316,6,0,0" Name="_textBox_TerrapinExit" VerticalAlignment="Top" Width="30" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="352,6,0,0" Name="_textBox_TerrapinAverage" VerticalAlignment="Top" Width="30" />
                            <Button Name="_button_TerrapinAdd" Click="ButtonTerrapinAdd_Click" Content="Add" IsDefault="True" Height="23" Margin="388,6,0,0" VerticalAlignment="Top" IsEnabled="False" HorizontalAlignment="Left" Width="31" />
                            <Button Name="_button_TerrapinLoad" Click="ButtonTerrapinLoad_Click" Content="Load" Height="23"  Width="75" Margin="0,6,87,0" VerticalAlignment="Top" HorizontalAlignment="Right" />
                            <Button Name="_button_TerrapinSave" Click="ButtonTerrapinSave_Click" Content="Save" Height="23" Margin="0,6,6,0" HorizontalAlignment="Right" Width="75" VerticalAlignment="Top" IsEnabled="False" />
                            <DataGrid Name="_dataGrid_TerrapinSettings" AlternatingRowBackground="#FFE9ECFA" Margin="6,35,6,6" Width="Auto" Height="Auto" Sorting="SortDataGrid">
                                <DataGrid.Columns>
                                    <DataGridCheckBoxColumn Header="On" Binding="{Binding IsEnabled}" />
                                    <DataGridTextColumn Header="Security" Binding="{Binding Security, Mode=OneWay}" />
                                    <DataGridTextColumn Header="Sector" Binding="{Binding Sector, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Unit Value" Binding="{Binding UnitValue}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Entry" Binding="{Binding EntryBars}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Exit" Binding="{Binding ExitBars}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Period" Binding="{Binding FastEMA}" CellStyle="{StaticResource ResourceKey=AlignCenter}" />
                                    <DataGridTextColumn Header="Phase" Binding="{Binding Phase, Mode=OneWay}" />
                                    <DataGridTemplateColumn Header="Cut">
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <Button Click="ButtonTerrapinClosePosition_Click">Cut</Button>
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                    <DataGridTextColumn Header="Last" Binding="{Binding Last, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="High" Binding="{Binding High, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="Low" Binding="{Binding Low, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="Fast" Binding="{Binding MAFast, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="Slow" Binding="{Binding MASlow, StringFormat=\{0:F2\}, Mode=OneWay}" CellStyle="{StaticResource ResourceKey=AlignRight}" />
                                    <DataGridTextColumn Header="Filter" Binding="{Binding Filter, Mode=OneWay}" />
                                    <DataGridTemplateColumn Header="Remove">
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <Button Click="ButtonTerrapinRemove_Click">Delete</Button>
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                </DataGrid.Columns>
                            </DataGrid>
                        </Grid>
                    </ad:DockableContent>

                </ad:DockablePane>
            </ad:ResizingPanel>
        </ad:DockingManager>
        <StatusBar Grid.Row="2">
            <StatusBarItem Name="_statusBar_ItemVersion" Content="Zephyr x.x.x.x"/>
            <Separator />
            <StatusBarItem Name="_statusBar_ConnectionSterling" Content="Sterling Live" />
            <Separator />
            <StatusBarItem Name="_statusBar_ConnectionBatsReplay" Content="Bats Replay" />
            <Separator />
            <StatusBarItem Name="_statusBar_ConnectionSterlingSimulation" Content="Sterling Simulation" />
            <Separator />
            <StatusBarItem />
        </StatusBar>
    </Grid>
</Window>
